﻿/*
 * 2023/3/29
 * 会员信息的领域模型
 * 
 * **/
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.Ph5_2009A.NewShopping.Domain
{
    [Table("MemberInfo")]
    public class MemberInfoModel : AudtiField<Guid>
    {
        /// <summary>
        /// 登录名称
        /// </summary>
        [Required(ErrorMessage = "登录名称不能为空")]
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Required(ErrorMessage = "登录密码不能为空")]
        public string Password { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        public string? HeadImg { get; set; }

        /// <summary>
        /// 昵称 
        /// </summary>
        public string? NickName { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public string? Sex { get; set; }

        /// <summary>
        /// 生日
        /// </summary>
        public DateTime? Birthday { get; set; }
        /// <summary>
        /// 注册日期
        /// </summary>
        public DateTime? CreatedTime { get; set; } = System.DateTime.UtcNow;

        /// <summary>
        /// 最后一次登录时间
        /// </summary>
        public DateTime? LastLoginTime { get; set; }
        /// <summary>
        /// 会员积分
        /// </summary>
        public int? Point { get; set; }
    }
}
